qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
lines(dose_list, qnet_list, pch = 19, , type = "o", lty = 2)
}
qnet_list <- list()
}
}
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
path <- "results/uncertainty/"
csv <- readRDS('/Users/sofiestubo/Downloads/CiPA-master/AP_simulation/results/uncertainty/metrics.rds')
print(csv)
qnet_list <- list()
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25)
sublist <- list()
for (i in 1:length(csv$qNet)) {
print(length(csv))
qnet_list[csv$dose[i]] <- csv$qNet[i]
if(csv$dose[i] == "25") {
if (i == 13){
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
plot(dose_list, qnet_list, xlim = 0:100, type = 'l', pch = 19, lty = 2)
}
else {
print(qnet_list)
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
lines(dose_list, qnet_list, pch = 19, , type = "l", lty = 2)
}
qnet_list <- list()
}
}
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
path <- "results/uncertainty/"
csv <- readRDS('/Users/sofiestubo/Downloads/CiPA-master/AP_simulation/results/uncertainty/metrics.rds')
print(csv)
qnet_list <- list()
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25)
sublist <- list()
for (i in 1:length(csv$qNet)) {
print(length(csv))
qnet_list[csv$dose[i]] <- csv$qNet[i]
if(csv$dose[i] == "25") {
if (i == 13){
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
plot(dose_list, qnet_list, xlim = c(0,100), type = 'l', pch = 19, lty = 2)
}
else {
print(qnet_list)
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
lines(dose_list, qnet_list, pch = 19, , type = "l", lty = 2)
}
qnet_list <- list()
}
}
# Add a linear graph to the qnet_graph
# Add a linear graph to the apd90_graph
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
path <- "results/uncertainty/"
csv <- readRDS('/Users/sofiestubo/Downloads/CiPA-master/AP_simulation/results/uncertainty/metrics.rds')
print(csv)
qnet_list <- list()
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25)
sublist <- list()
for (i in 1:length(csv$qNet)) {
print(length(csv))
qnet_list[csv$dose[i]] <- csv$qNet[i]
if(csv$dose[i] == "25") {
if (i == 13){
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
plot(dose_list, qnet_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2)
}
else {
print(qnet_list)
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
lines(dose_list, qnet_list, pch = 19, , type = "l", lty = 2)
}
qnet_list <- list()
}
}
# Add a linear graph to the qnet_graph
# Add a linear graph to the apd90_graph
qnet <- list()
apd90 <- list()
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- file.dir()
print(directory)
path <- "results/uncertainty/"
csv <- readRDS('/Users/sofiestubo/Downloads/CiPA-master/AP_simulation/results/uncertainty/metrics.rds')
qnet_list <- list()  #a list of qnet values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$qNet)) {
# add the qnet of each dose in a sample
qnet_list[csv$dose[i]] <- csv$qNet[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, qnet_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, qnet_list, pch = 19, , type = "l", lty = 2)
}
#the qnet_list is emptied for the next sample data
qnet_list <- list()
}
}
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- getwd()
print(directory)
path <- "results/uncertainty/"
csv <- readRDS('/Users/sofiestubo/Downloads/CiPA-master/AP_simulation/results/uncertainty/metrics.rds')
qnet_list <- list()  #a list of qnet values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$qNet)) {
# add the qnet of each dose in a sample
qnet_list[csv$dose[i]] <- csv$qNet[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, qnet_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, qnet_list, pch = 19, , type = "l", lty = 2)
}
#the qnet_list is emptied for the next sample data
qnet_list <- list()
}
}
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- getwd()
path <- "results/uncertainty/"
print(paste(directory, path))
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- getwd()
path <- "/AP_simulation/results/uncertainty/metrics.rds"
print(paste(directory, path))
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- getwd()
path <- "/AP_simulation/results/uncertainty/metrics.rds"
print(paste(directory,path))
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- getwd()
path <- "/AP_simulation/results/uncertainty/metrics.rds"
print(paste(directory,path, sep=""))
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- getwd()
path <- "/AP_simulation/results/uncertainty/metrics.rds"
print(paste(directory,path, sep=""))
csv <- readRDS(paste(directory,path, sep=""))
ots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory <- getwd()
path <- "/AP_simulation/results/uncertainty/metrics.rds"
print(paste(directory,path, sep=""))
csv <- readRDS(paste(directory,path, sep=""))
print(csv)
# Create 2 plots: qnet vs dose(qnet_graph) and apd90 vs dose(apd90_graph)
#qnet_graph
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
# Create apd90 vs dose(apd90_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
qnet_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
# Create apd90 vs dose(apd90_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
qnet_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
APD90_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
# Create apd90 vs dose(apd90_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
APD90_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
# Create apd90 vs dose(apd90_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
APD90_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
# Create apd90 vs dose(apd90_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
APD90_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, ylim = c(0,1000), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
# Create apd90 vs dose(apd90_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
APD90_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, ylim = c(300,1000), type = 'l', pch = 19, lty = 2)
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
# Create apd90 vs dose(apd90_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
APD90_list <- list()  #a list of APD90 values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$APD90)) {
# add the APD90 of each dose in a sample
APD90_list[csv$dose[i]] <- csv$APD90[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
APD90_list<-APD90_list[!sapply(APD90_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, APD90_list, ylim = c(300,1000), type = 'l', pch = 19, lty = 2, main= "APD90 vs dose", xlab="Doses", ylab="APD90")
}
#subsequently lines are added to the plot
else {
lines(dose_list, APD90_list, pch = 19, , type = "l", lty = 2)
}
#the APD90_list is emptied for the next sample data
APD90_list <- list()
}
}
# Create qnet vs dose (qnet_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
qnet_list <- list()  #a list of qnet values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$qNet)) {
# add the qnet of each dose in a sample
qnet_list[csv$dose[i]] <- csv$qNet[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, qnet_list, ylim = c(0,100), type = 'l', pch = 19, lty = 2, main= "qNet vs dosage", xlab="Doses", ylab="qNet")
}
#subsequently lines are added to the plot
else {
lines(dose_list, qnet_list, pch = 19, , type = "l", lty = 2)
}
#the qnet_list is emptied for the next sample data
qnet_list <- list()
}
}
# Create qnet vs dose (qnet_graph)
library(readr)
library(dplyr)
qnet <- list()
directory_path <- getwd()
file_path <- "/AP_simulation/results/uncertainty/metrics.rds"
csv <- readRDS(paste(directory_path,file_path, sep=""))
print(csv)
qnet_list <- list()  #a list of qnet values for each sampling
dose_list <- list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25) #the various doses of each sampling
# go through the metrics.rds file
for (i in 1:length(csv$qNet)) {
# add the qnet of each dose in a sample
qnet_list[csv$dose[i]] <- csv$qNet[i]
# when the dose is 25, the sample is completed, and should be made into a plot
if(csv$dose[i] == "25") {
#remove null values from the plot
qnet_list<-qnet_list[!sapply(qnet_list,is.null)]
#in the first sample, the plot is made
if (i == 13){
plot(dose_list, qnet_list, ylim = c(-50,100), type = 'l', pch = 19, lty = 2, main= "qNet vs dosage", xlab="Doses", ylab="qNet")
}
#subsequently lines are added to the plot
else {
lines(dose_list, qnet_list, pch = 19, , type = "l", lty = 2)
}
#the qnet_list is emptied for the next sample data
qnet_list <- list()
}
}
#--- get arguments
drug<-args$drug
pwd
cd AP_simulation2
